package demostatic;

/**
 * @author: knowno
 * @create: 2025-09-12 10:02
 * @Version 1.0
 **/
public class TestStatic {

    //1 入口
    public static void main(String[] args) {
        System.out.println(TestStatic.a);
    }

    //2 静态变量
    public static int a = 1;

    //3 静态方法
    public static void test1() {
        System.out.println("test1");
    }

    //4 静态代码块
    static {
        System.out.println("static block");
    }

    /**
     * 静态内部类
     */
    static class Test{
        public Test() {
            System.out.println("Test");
        }
    }

}
